 
function checkManagerLogin()
{
    document.getElementById('managerSubmitLogin').disabled = false;
    
}


function askConfirmation()
{
    var r = confirm("Continue?");
    if (r == true)
    {
      return true;
    }
    else
      return false;
}


function validateAddProduct()
{
    var formReset = new Array(3);
    var noError = 2;
    var count = 2;
    
    for(count = 1; count >= 0; count--)
        {
            formReset[count] = 0;
        }
        
        if (document.addProduct.name.value != "Product Name"
                && document.addProduct.name.value.length >= 4)
            {
                formReset[0] = 1; 
                document.addProduct.name.style.backgroundColor = "#ffffff";
            }
            else
                {
                    formReset[0] = 0; 
                    document.addProduct.name.style.backgroundColor = "#fdff76";
                }
                
        if (document.addProduct.description.value != "Product Description"
                && document.addProduct.description.value.length >= 4)
            {
                formReset[1] = 1; 
                document.addProduct.description.style.backgroundColor = "#ffffff";
            }
            else
                {
                    formReset[1] = 0; 
                    document.addProduct.description.style.backgroundColor = "#fdff76";
                }
                
         if (document.addProduct.price.value != "Price"
                && document.addProduct.price.value.length >= 1
                && isNaN(document.addProduct.price.value) == false)
            {
                formReset[2] = 1; 
                document.addProduct.price.style.backgroundColor = "#ffffff";
            }
            else
                {
                    formReset[2] = 0; 
                    document.addProduct.price.style.backgroundColor = "#fdff76";
                }
        
        
    for(count = 1; count >= 0; count--)
        {
            noError = noError - formReset[count];
        }
    
    if(noError == 0)
        {
            return askConfirmation();
        }
    else
        {
            alert("Please check values.");
            return false;
        }
    
}








